@extends('layouts.default') @section('main')
    <link rel="stylesheet" href="/css/uniform.css" />
    <link rel="stylesheet" href="/css/select2.css" />
    <div id="content">
        <div id="content-header">
            <div id="breadcrumb">
                <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i
                            class="icon-home"></i> 首页</a>
                <a href="#" class="tip-bottom">全局设置</a>
                <a href="#" class="current">短信日志</a>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span11">
                    {{--<a href="{{url('cache/create')}}"><button--}}
                    {{--class="btn">新增项目</button></a>--}}
                    <form action="{{url('logsms/search')}}" method="post">
                        <table>
                            <tr>
                                <th>
                                    <label >内容 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="content"  placeholder="内容" />
                                    </div>
                                </th>

                                <th>
                                    <label >手机号 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="phone"  placeholder="手机号" />
                                    </div>
                                </th>

                                <th>
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <div class="controls">
                                        <button type="submit" class="btn btn-info">查询</button>
                                    </div>
                                </th>
                            </tr>
                        </table>
                    </form>
                    <div class="widget-box">
                        <div class="widget-title">
                            <span class="icon"><i class="icon-th"></i></span>
                            <h5>短信日志管理</h5>
                        </div>
                        <div class="widget-content nopadding">
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>短信内容</th>
                                    <th>短信号码</th>
                                    <th>发送时间</th>
                                    <th>类型</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($lists as $key => $list)
                                    <tr class="gradeX">
                                        <td>{{$list->content}}</td>
                                        <td>{{$list->phone}}</td>
                                        <td>{{$list->created_at->toDateTimeString()}}</td>
                                        <td>{{$list->type}}</td>
                                        <td class="center">
                                            {{--@if(in_array('delete',$actions))<a data-original-title="删除" data-toggle="modal" class="tip cache_delete" cache_action="{{$list->action}}" href="#myAlert"><i class="icon-trash"></i></a>@endif--}}
                                            {{--<a data-original-title="编辑" class="tip" href="{{url('cache/edit?id='.$list->id)}}"><i class="icon-pencil"></i></a>--}}
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <?php echo $lists->appends(['content' => $content,'phone' => $phone])->render();?>

                </div>
            </div>
        </div>
        <script src="/js/matrix.tables.js"></script>
@stop
